
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'Login.dart';

class MainBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
        child: buildColumn(context));
  }

  Column buildColumn(BuildContext context) {
    return Column(
        children: [
          SizedBox(height: 20),
          Container(
            width: 100,
            height: 50,
            color: Colors.blue,
            child: MaterialButton(
              child: Text("登录"),
              onPressed: () {
                Navigator.push(context,
                  MaterialPageRoute(builder: (context){
                    return Login();
                  })
                );
              },
            ),
          ),
          SizedBox(height: 20),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 10),
            width: 100,
            height: 50,
            color: Colors.greenAccent,
            child: MaterialButton(
              child: Text("汇报"),
              onPressed: () {
                debugPrint("进入汇报页面");
              },
            ),
          ),
          SizedBox(height: 20),
        ],
      );
  }
}